/*    */ package com.qmsk.business.bussBill.depositTotal.controller;
/*    */ 
/*    */ import com.qmsk.business.bussBill.depositTotal.dao.DepositTotalDao;
/*    */ import com.utils.basic.MapUtils;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import java.sql.SQLException;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"depositTotal"})
/*    */ public class DepositTotalController
/*    */ {
/* 28 */   private static final Logger logger = Logger.getLogger(DepositTotalController.class);
/*    */ 
/*    */   @Autowired
/*    */   private DepositTotalDao dao;
/*    */ 
/*    */   @RequestMapping(value={"find/shopId/{shopId}/member/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListShopIdMember(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") String shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*    */   {
/* 48 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*    */     try {
/* 50 */       Map params = new HashMap();
/* 51 */       MapUtils.addToMap(params, "paid", RequestUtils.getInt(request, "paid"));
/* 52 */       MapUtils.addToMap(params, "shopId", shopId);
/* 53 */       MapUtils.addToMap(params, "dtPaidStart", RequestUtils.getDate(request, "dtPaidStart"));
/* 54 */       MapUtils.addToMap(params, "dtPaidEnd", RequestUtils.getDate(request, "dtPaidEnd"));
/* 55 */       MapUtils.addPercentToMap(params, "cardNo", RequestUtils.getString(request, "cardNo"));
/* 56 */       MapUtils.addPercentToMap(params, "mp", RequestUtils.getString(request, "mp"));
/* 57 */       MapUtils.addPercentToMap(params, "custName", RequestUtils.getString(request, "custName"));
/* 58 */       MapUtils.addPercentToMap(params, "license", RequestUtils.getString(request, "license"));
/* 59 */       GsonEbRst gsonEbRst = this.dao.getGson(params, nPageIdx, 
/* 60 */         nPageSize);
/* 61 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (SQLException e) {
/* 63 */       logger.error(e);
/* 64 */       ResponseUtils.setErrorMsgResponse(
/* 65 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ 
/*    */   @RequestMapping(value={"find/shopId/{shopId}/member/sum"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListShopIdMemberSum(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") String shopId)
/*    */   {
/*    */     try
/*    */     {
/* 83 */       Map params = new HashMap();
/* 84 */       MapUtils.addToMap(params, "paid", RequestUtils.getInt(request, "paid"));
/* 85 */       MapUtils.addToMap(params, "shopId", shopId);
/* 86 */       MapUtils.addToMap(params, "dtPaidStart", RequestUtils.getDate(request, "dtPaidStart"));
/* 87 */       MapUtils.addToMap(params, "dtPaidEnd", RequestUtils.getDate(request, "dtPaidEnd"));
/* 88 */       MapUtils.addPercentToMap(params, "cardNo", RequestUtils.getString(request, "cardNo"));
/* 89 */       MapUtils.addPercentToMap(params, "mp", RequestUtils.getString(request, "mp"));
/* 90 */       MapUtils.addPercentToMap(params, "custName", RequestUtils.getString(request, "custName"));
/* 91 */       MapUtils.addPercentToMap(params, "license", RequestUtils.getString(request, "license"));
/* 92 */       GsonEbRst gsonEbRst = this.dao.getGsonOfSum(params);
/* 93 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (SQLException e) {
/* 95 */       logger.error(e);
/* 96 */       ResponseUtils.setErrorMsgResponse(
/* 97 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.bussBill.depositTotal.controller.DepositTotalController
 * JD-Core Version:    0.5.3
 */